<template>
  <div class="search-warp">
    <card text="testcard"></card>
    <navbar :title="title" :titleColor="titleColor"></navbar>
    <van-search
      :value="value"
      placeholder="请输入搜索关键词"
      use-action-slot
      bind:search="onSearch"
    >
      <view
        slot="action"
        bind:tap="onSearch"
      >搜索</view>
    </van-search>

  </div>
</template>

<script>
import navbar from '@/components/navbar'
import card from '@/components/card'
export default {
  components: {
    navbar,
    card
  },

  data () {
    return {
      title: '导航栏',
      titleColor: '#000000',
      value: ''
    }
  },

  created () {
    console.log('test')
  },
  methods: {
    onSearch () {
      console.log('test')
      console.log(this.value)
    }
  }
}
</script>

<style>
.search-warp {
  text-align: center;
  margin-top: 100px;
}
</style>
